const app = getApp()
import {wxtel} from "../../api/home"
Component({
  data: {
    showPopup: false,
    loadingHide: true,
    status: false,
    saib: false,
    text: '',
  },
  lifetimes: {
    ready() {
      if (!wx.getStorageSync('status')) {
          this.setData({
            showPopup: true
          })
      }
    }
  },
  methods: {
    onClose(e) {
      this.setData({
        showPopup: false
      })
      wx.setStorageSync('status', true)

    },
    getPhoneNumber(e) {
        console.log(e);
      let that = this
      this.triggerEvent("itemChange",e.detail);
      this.onClose()
    //   wxtel({
    //       'code':e.detail.code,
    //       'encryptedData':e.detail.encryptedData,
    //       'iv':e.detail.iv
    //   }).then(res=>{
    //       console.log(res);
    //   })

    },
    choose() {
      this.setData({
        status: !this.data.status
      })
    },
  },
  
})